<template>
  <div class="panel" :style="{width:width,height:height}">
    <div class="panel-header">
      <div class="header-left">
        <span class="title">{{ title }}</span>
      </div>
      <div class="header-right">
        <slot name="headerRight"></slot>
      </div>
    </div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'Panel',
  props: {
    width: {
      type: String,
      default: '100%'
    },
    height: {
      type: String,
      default: 'auto'
    },
    title: {
      type: String,
      default: ''
    }
  }
}
</script>
<style lang="scss" scoped>
.panel {
  background: #FFFFFF;
  border-radius: 8px;
  padding: .25rem;

  .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .title {
    font-size: 20px;
    font-weight: bold;
    color: #1C1C28;
    line-height: 28px;
  }
}
</style>
